<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $model admin\modules\equipment_info\models\EquipmentAppVersion */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="equipment-app-version-form">

    <?php $form = ActiveForm::begin(); ?>

    <?= $form->field($model, 'app_version_id')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'run_os')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'tag')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'title')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'download_url')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'must_update')->widget(\kartik\widgets\Select2::class, [
        'data' => \common\models\db\EquipmentAppVersion::getMustUpdateKvs(),
    ]) ?>

    <?= $form->field($model, 'update_msg')->textarea(['rows' => 6]) ?>

    <?= $form->field($model, 'notify_msg')->textarea(['rows' => 6]) ?>

    <?= $form->field($model, 'status')->widget(\kartik\widgets\Select2::class, [
        'data' => \common\models\db\EquipmentAppVersion::getStatusKvs(),
    ]) ?>


    <?php if (!Yii::$app->request->isAjax) { ?>
        <div class="form-group">
            <?= Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
        </div>
    <?php } ?>

    <?php ActiveForm::end(); ?>

</div>
